#ifndef _VORONOI_
#define _VORONOI_

#include <vector>
#include <iostream>

using namespace std;

struct Vertex {
    float x, y;
};

inline ostream& operator<<(ostream& o, const Vertex& v) {
    o << '(' << v.x << ", " << v.y << ')';
}

typedef vector<int> polygon;
extern Vertex* vertices;

void build_voronoi(const vector<double>& ps, vector<polygon>& res);

#endif
